﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

using Presentation.Models;

using Facade.Manager;

using Domain.Model;

namespace Presentation.Controllers
{
    public class PortfolioController : Controller
    {
        private PortfolioManager portfolioManager;

        public PortfolioController()
        {
            portfolioManager = PortfolioManager.Instance;
        }

        //
        // GET: /Portfolio/
        [Authorize]
        public ActionResult Index()
        {
            return RedirectToAction("Overview");
            //return View();
        }

        //
        // GET: /Portfolio/Overview
        [Authorize]
        public ActionResult Overview()
        {
            var model = new PortfolioViewModel
            {
                Programs = portfolioManager.GetAllPrograms(),
                Projects = portfolioManager.GetAllStandaloneProjects()
            };

            return View(model);
        }
    }
}
